<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>{$system_name}管理中心 - 商品列表</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <link rel="stylesheet" href="__PUBLIC__/css/amazeui.min.css"/>
    <link rel="stylesheet" href="__PUBLIC__/css/admin.css"/>
</head>
<body>
    <div class="admin-content">

        <!--页头-->
        <div class="am-cf am-padding">
            <div class="am-fl am-cf">
                <strong class="am-text-primary am-text-lg">商品管理</strong> / <small>商品列表</small>
            </div>
            <div class="am-g">
                <div class="am-u-sm-12 am-u-md-2 am-u-sm-offset-8">
                    <div class="am-btn-toolbar">
                        <div class="am-btn-group am-btn-group-xs">
                            <a href="{:U('goods/goods_info')}" class="am-btn am-btn-default"><span class="am-icon-plus"></span> 添加新的商品</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!--筛选-->
        <div class="am-g">
            <form method="get">
            <div class="am-u-sm-12 am-u-md-9">
                <div class="am-form-group">

                    <select data-am-selected="{btnSize: 'sm'}" name="category_id">
                        <option value="0">所有分类</option>
                        <volist name="select_category" id="list">
                            <option value="{$list.category_id}">{$list.category_name}</option>
                        </volist>
                        </volist>
                    </select>

                    <select data-am-selected="{btnSize: 'sm'}" name="brand_id">
                        <option value="0">所有品牌</option>
                        <volist name="select_brand" id="list">
                        <option value="{$list.brand_id}">{$list.brand_name}</option>
                        </volist>
                    </select>

                    <select data-am-selected="{btnSize: 'sm'}" name="goods_attr">
                        <option value="0">商品特性</option>
                        <volist name="select_goods_attr" id="list" key="key">
                        <option value="{$key}">{$list}</option>
                        </volist>
                    </select>

                    <select data-am-selected="{btnSize: 'sm'}" name="is_on_sale">
                        <option value="0">是否上架</option>
                        <volist name="select_is_on_sale" id="list" key="key">
                            <option value="{$key}">{$list}</option>
                        </volist>
                    </select>

                </div>
            </div>

            <div class="am-u-sm-12 am-u-md-3">
                <div class="am-input-group am-input-group-sm">
                    <input type="text" class="am-form-field" name="keywords">
                    <span class="am-input-group-btn"><button class="am-btn am-btn-default" type="button">搜索</button></span>
                </div>
            </div>
            </form>
        </div>

        <!--表格-->
        <div class="am-g">
            <div class="am-u-sm-12">
                <table class="am-table am-table-striped am-table-hover table-main">
                    <thead>
                        <tr>
                            <volist name="table_head" id="list">
                            <if condition="$key eq 'id'">
                            <th><input type="checkbox" onclick="selectAll(this)"/> {$list}</th>
                            <else/>
                            <th>{$list}</th>
                            </if>
                            </volist>
                        </tr>
                    </thead>

                    <tbody>
                        <volist name="goods_list" id="list">
                        <tr>
                            <td><input type="checkbox" class="goods" value="{$list.goods_id}"/> {$list.goods_id}</td>
                            <td>{$list.goods_name}</td>
                            <td>{$list.goods_category_name}</td>
                            <td>{$list.is_on_sale}</td>
                            <td>{$list.is_best}</td>
                            <td>{$list.is_new}</td>
                            <td>{$list.is_hot}</td>
                            <td>{$list.goods_number}</td>
                            <td>
                                <a href="">查看</a>
                                <a class="am-btn am-btn-default am-btn-xs am-text-secondary" href="">编辑</a>
                                <a class="am-btn am-btn-default am-btn-xs am-hide-sm-only" href="">复制</a>
                                <a class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only">删除</a>
                            </td>
                        </tr>
                        </volist>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</body>
</html>